package com.qy566.gps.simulator.web.vo;


import java.io.Serializable;


public class BaseResponse<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    private static final String CODE_VALUE = "200";
    private String code = "200";
    private String msgKey;
    private String msgDesc;
    private T data;
    public static final BaseResponse SUCCESS = new BaseResponse();

    public BaseResponse() {
        this.msgKey = "success";
        this.data = null;
    }

    public BaseResponse(String code,String msgDesc,T data) {
            this.code = code;
            this.msgKey = msgDesc;
            this.data = data;
    }

    public BaseResponse(T data) {
        this.data = data;
    }


    public boolean isSuccess() {
        return "200".equals(this.code);
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsgKey() {
        return this.msgKey;
    }

    public void setMsgKey(String msgKey) {
        this.msgKey = msgKey;
    }

    public String getMsgDesc() {
        return this.msgDesc;
    }

    public void setMsgDesc(String msgDesc) {
        this.msgDesc = msgDesc;
    }

    public T getData() {
        return this.data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
